package com.bear.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.bear.client.ProvideService;
import com.bear.excep.ExceptionExcep;
import com.bear.excep.SentinelExcp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author LiuShanshan
 * @version V1.0
 * @Description
 */
@Service
public class ConsumerServiceImpl {
    @Autowired
    ProvideService provideService;

    @SentinelResource(value = "getProvide", blockHandlerClass = SentinelExcp.class, blockHandler = "provideGet")
    public void getProvide(){
        System.out.println("进入方法");
        String s = provideService.provideGet();
        System.out.println(s);
    }
}
